<?php
	//使用GD库画图
	//需要一个画布
	//$huabu = imagecreate(400,400);
	//创建一个真色彩的画布
	$huabu = imagecreatetruecolor(200,200);
	//我需要一支笔
	//我需要颜色
	$red = imagecolorallocate($huabu,255,0,0);
	$white = imagecolorallocate($huabu,255,0,0);
	$pink = imagecolorallocate($huabu,249,183,245);
	//画布也需要颜色
	//填充画布
	imagefill($huabu,1,1,$white);
	
	//画出一个像素点
	
	imagesetpixel($huabu,110,110,$red);
	for($i = 50; $i <=100; $i ++);{
		imagesetpixel($huabu,50,$i,$red);
	}
	
	//画一个线
	imageline($huabu,20,20,100,100,$red);
	//画一个矩形
	imagerectangle($huabu,20,20,180,180,$pink);
	//画一个矩形并填充
	imagefilledrectangle($huabu,20,20,180,180,$pink);
	//画多边形
	$arr = array(23,56,78,45,23,45,98,143,54,32,67,98,78,34);
	imagepolygon($huabu,$arr,7,$red);
	header("content-type:image/png");
	imagepng($huabu);
	imagedestroy($huabu);
	